var arr = [
				"刻舟求剑","一诺千金","不伦不类","反清复明","反复无常","支支吾吾","津津乐道","乐不思蜀","刎颈之交","尊师重道","偷奸耍滑","勤勤恳恳","一马当先",
				"一刀两断","意大利炮","蹒跚学步","冷冷清清","流年不利","围魏救赵","孙子兵法","万古长青","流芳百世","铁血丹心","王侯将相","揭竿而起","刀光剑影"
			];
			
			
var nums = 1;
var scores = 0;
var start = document.getElementById("start");
var yes = document.getElementById("yes");
var no = document.getElementById("no");
var num = document.getElementById("num");
var score = document.getElementById("score");
var timu = document.getElementById("timu");
var timer = document.getElementById("timer");
console.log(timer);
start.onclick = function(){
	suiji();
	timer.innerHTML = 180;
	nums = 1;
	scores = 0;
	start.style = "display:none;";
	yes.style = "inline-block;";
	no.style = "inline-block;";
	num.innerHTML = "第" + nums + "题";
	score.innerHTML = scores + "分";
	var time = 180;
	
	var id = setInterval(function(){
		time--;
		timer.innerHTML = time;
		if(time <= 0){
			clearInterval(id);
			timer.innerHTML = "over";
			timu.innerHTML = "得分：" + scores;
			start.style = "display:inline-block;";
			yes.style = "display:none;";
			no.style = "display:none;";
		}
	},100);
}
yes.onclick = function(){
	nums++;
	scores++;
	num.innerHTML = "第" + nums + "题";
	score.innerHTML = scores + "分";
	suiji();
}
no.onclick = function(){
	nums++;
	num.innerHTML = "第" + nums + "题";
	suiji();
}
function suiji(){
	var s = Math.floor(Math.random() * arr.length);
	timu.innerHTML = arr[s];
	// return s;
}
